home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / www / amitrix / german3b.lha / docs / _starttcpscript2 < prev    next >
Text File  |  1996-10-31  |  1KB  |  46 lines

  1. ; Sample script to start a TCP program that does not return when
  2. ; the session is active.
  3. ;
  4. ; This is the second script, the one that actually starts the stack.
  5. ; You should not configure this script in AWeb. It is started from within
  6. ; the _starttcpscript file.
  7. ;
  8. ; Make sure to change path and program name of the TCP program in this script
  9. ; to the one you're actually using.
  10. ; =======================================================================
  11.  
  12. .key DUMMY/K ; so we can use <$$>
  13.  
  14. ; Remember the CLI process we are running in
  15.  
  16. SetEnv TCPPROCESS <$$>
  17.  
  18. ; Don't stop the script in case of failure
  19.  
  20. FailAt 30
  21.  
  22. ; Start the TCP stack.
  23. ;
  24. ; ***********************************************************************
  25. ; *** Change this line to start the actual TCP stack you are using, like
  26. ; *** Miami or TermiteTCP.
  27.  
  28. TCPPath:TCPProgram
  29.  
  30. ; ***********************************************************************
  31.  
  32. ; If the connection didn't succeed, now break the starting process, or
  33. ; else it will wait forever.
  34. ; If the start script isn't active any more, the variable will be unset
  35. ; so the Break command fails.
  36.  
  37. If WARN
  38.    Break $STARTTCPPROCESS D
  39. EndIf
  40.  
  41. ; Unset the variable with our process number so if the _stoptcpscript is
  42. ; run it won't accidentally break another process
  43.  
  44. UnSetEnv TCPPROCESS
  45.  
  46.